import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      // 仪表板
      path: '/',
      name: 'dashBoard',
      meta: {
        menu: '/'
      },
      component: resolve => require(['@/pages/dashBoard'], resolve)
    },
    {
      // email meta:menu 标识菜单标亮
      path: '/emailList',
      name: 'email',
      meta: {
        menu: '/emailList'
      },
      component: resolve => require(['@/pages/email'], resolve)
    },
    {
      // 增加邮箱
      path: '/emailAdd',
      name: 'emailAdd',
      meta: {
        menu: '/emailList'
      },
      component: resolve => require(['@/pages/email/detail'], resolve)
    },
    {
      // 邮箱信息修改
      path: '/emailUpdate',
      name: 'emailUpdate',
      meta: {
        menu: '/emailList'
      },
      component: resolve => require(['@/pages/email/detail'], resolve)
    },
    {
      // vps
      path: '/vpsList',
      name: 'vps',
      meta: {
        menu: '/vpsList'
      },
      component: resolve => require(['@/pages/vps'], resolve)
    },
    {
      // 增加vps
      path: '/vpsAdd',
      name: 'vpsAdd',
      meta: {
        menu: '/vpsList'
      },
      component: resolve => require(['@/pages/vps/detail'], resolve)
    },
    {
      // vps信息修改
      path: '/vpsUpdate',
      name: 'vpsUpdate',
      meta: {
        menu: '/vpsList'
      },
      component: resolve => require(['@/pages/vps/detail'], resolve)
    },
    {
      // 虚拟机
      path: '/virtualList',
      name: 'virtual',
      meta: {
        menu: '/virtualList'
      },
      component: resolve => require(['@/pages/virtual'], resolve)
    },
    {
      // 增加虚拟机
      path: '/virtualAdd',
      name: 'virtualAdd',
      meta: {
        menu: '/virtualList'
      },
      component: resolve => require(['@/pages/virtual/detail'], resolve)
    },
    {
      // 信息修改
      path: '/virtualUpdate',
      name: 'virtualUpdate',
      meta: {
        menu: '/virtualList'
      },
      component: resolve => require(['@/pages/virtual/detail'], resolve)
    },
    {
      // 虚拟卡
      path: '/cardList',
      name: 'card',
      meta: {
        menu: '/cardList'
      },
      component: resolve => require(['@/pages/card'], resolve)
    },
    {
      // 增加虚拟卡
      path: '/cardAdd',
      name: 'cardAdd',
      meta: {
        menu: '/cardList'
      },
      component: resolve => require(['@/pages/card/detail'], resolve)
    },
    {
      // 虚拟卡修改
      path: '/cardUpdate',
      name: 'cardUpdate',
      meta: {
        menu: '/cardList'
      },
      component: resolve => require(['@/pages/card/detail'], resolve)
    },
    {
      // 地址
      path: '/addressList',
      name: 'address',
      meta: {
        menu: '/addressList'
      },
      component: resolve => require(['@/pages/address'], resolve)
    },
    {
      // 增加地址
      path: '/addressAdd',
      name: 'addressAdd',
      meta: {
        menu: '/addressList'
      },
      component: resolve => require(['@/pages/address/detail'], resolve)
    },
    {
      // 地址修改
      path: '/addressUpdate',
      name: 'addressUpdate',
      meta: {
        menu: '/addressList'
      },
      component: resolve => require(['@/pages/address/detail'], resolve)
    },
    {
      // 测评账号
      path: '/accountList',
      name: 'account',
      meta: {
        menu: '/accountList'
      },
      component: resolve => require(['@/pages/account'], resolve)
    },
    {
      // 增加账号
      path: '/accountAdd',
      name: 'accountAdd',
      meta: {
        menu: '/accountList'
      },
      component: resolve => require(['@/pages/account/detail'], resolve)
    },
    {
      // 地址修改
      path: '/accountUpdate',
      name: 'accountUpdate',
      meta: {
        menu: '/accountList'
      },
      component: resolve => require(['@/pages/account/detail'], resolve)
    },
    {
      // 订单
      path: '/orderList',
      name: 'order',
      meta: {
        menu: '/orderList'
      },
      component: resolve => require(['@/pages/order'], resolve)
    },
    {
      // 增加订单
      path: '/orderAdd',
      name: 'orderAdd',
      meta: {
        menu: '/orderList'
      },
      component: resolve => require(['@/pages/order/detail'], resolve)
    },
    {
      // 修改订单
      path: '/orderUpdate',
      name: 'orderUpdate',
      meta: {
        menu: '/orderList'
      },
      component: resolve => require(['@/pages/order/detail'], resolve)
    },
    {
      // 下单
      path: '/applyList',
      name: 'apply',
      meta: {
        menu: '/applyList'
      },
      component: resolve => require(['@/pages/apply'], resolve)
    },
    {
      // 增加下单记录
      path: '/applyAdd',
      name: 'applyAdd',
      meta: {
        menu: '/applyList'
      },
      component: resolve => require(['@/pages/apply/detail'], resolve)
    },
    {
      // 修改下单记录
      path: '/applyUpdate',
      name: 'applyUpdate',
      meta: {
        menu: '/applyList'
      },
      component: resolve => require(['@/pages/apply/detail'], resolve)
    }
  ]
})
